import React, { Component } from 'react'
import moment from 'moment';
import {
  Button, Table, Checkbox, Radio,
  Select, Input, Switch, DatePicker
} from 'antd'
import { UserOutlined } from '@ant-design/icons';


export default class Tab1 extends Component {

  disabledDate = (current) => {
    // Can not select days before today and today
    return current && current < moment().endOf('day');
  }

  plainOptions = ['Apple', 'Pear', 'Orange']
  options = [
    { label: 'Apple', value: 'Apple' },
    { label: 'Pear', value: 'Pear' },
    { label: 'Orange', value: 'Orange' },
  ]
  optionsWithDisabled = [
    { label: 'Apple', value: 'Apple' },
    { label: 'Pear', value: 'Pear' },
    { label: 'Orange', value: 'Orange', disabled: true },
  ];

  render () {
    const { RangePicker } = DatePicker;
    return (
      <>
        <Button >
          1111量化
        </Button>
        <Select
          mode="multiple"
          size={'small'}
          defaultValue={'8'} allowClear autoFocus={true}>
          <Select.Option value={'8'}>SUMSCOPE</Select.Option>
          <Select.Option value={'9'}>STC</Select.Option>
          <Select.Option value={'7'}>量化</Select.Option>
          <Select.Option value={'10'}>监控</Select.Option>
        </Select>
        <Input disabled placeholder={'请输入...'} prefix={<UserOutlined />} allowClear={true} />
        <Input size={'small'} allowClear={true} />
        <Switch defaultChecked />
        <DatePicker showTime disabledDate={this.disabledDate} />
        <Button size={'small'}>1111量化</Button>
        <RangePicker size={'small'} showTime />
        <Checkbox >
          {'中国'}
        </Checkbox>

        <Checkbox.Group
          options={this.optionsWithDisabled}
          // disabled={(item) => { return item.value === 'Pear' }}
          defaultValue={['Apple']}
          onChange={this.onChange}
        />

        <Radio.Group>
          <Radio value={1}>A</Radio>
          <Radio value={2}>B</Radio>
          <Radio value={3}>C</Radio>
          <Radio value={4}>D</Radio>
        </Radio.Group>


      </>
    )
  }
}